<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{mensagens.CreateReservaFilmeTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{mensagens.CreateReservaFilmeLabel_idReserva}" for="idReserva" />
                    <h:inputText id="idReserva" value="#{reservaFilmeController.selected.idReserva}" title="#{mensagens.CreateReservaFilmeTitle_idReserva}" required="true" requiredMessage="#{mensagens.CreateReservaFilmeRequiredMessage_idReserva}"/>
                    <h:outputLabel value="#{mensagens.CreateReservaFilmeLabel_data}" for="data" />
                    <h:inputText id="data" value="#{reservaFilmeController.selected.data}" title="#{mensagens.CreateReservaFilmeTitle_data}" >
                        <f:convertDateTime pattern="MM/dd/yyyy" />
                    </h:inputText>
                    <h:outputLabel value="#{mensagens.CreateReservaFilmeLabel_filmeIdFilme}" for="filmeIdFilme" />
                    <h:selectOneMenu id="filmeIdFilme" value="#{reservaFilmeController.selected.filmeIdFilme}" title="#{mensagens.CreateReservaFilmeTitle_filmeIdFilme}" required="true" requiredMessage="#{mensagens.CreateReservaFilmeRequiredMessage_filmeIdFilme}">
                        <f:selectItems value="#{filmeController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                    <h:outputLabel value="#{mensagens.CreateReservaFilmeLabel_usuarioidusuario}" for="usuarioidusuario" />
                    <h:selectOneMenu id="usuarioidusuario" value="#{reservaFilmeController.selected.usuarioidusuario}" title="#{mensagens.CreateReservaFilmeTitle_usuarioidusuario}" required="true" requiredMessage="#{mensagens.CreateReservaFilmeRequiredMessage_usuarioidusuario}">
                        <f:selectItems value="#{usuarioController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{reservaFilmeController.create}" value="#{mensagens.CreateReservaFilmeSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{reservaFilmeController.prepareList}" value="#{mensagens.CreateReservaFilmeShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:link outcome="/index" value="#{mensagens.CreateReservaFilmeIndexLink}"/>
            </h:form>
        </ui:define>
    </ui:composition>

</html>
